package test

import "fmt"

func f1() {
	fmt.Printf("我没有返回值，只是进行一些计算")
}
func sum(a int, b int) (ret int) {
	ret = a + b
	return
}
func f2() (name string, age int) {
	name = "老郭"
	age = 30
	return
}
func getStr(str string) (str1 string) {
	str1 = str + ":"
	return
}
func setStr(str *string) {
	*str = *str + ":"
}
func main() {
	a := sum(1, 2)
	fmt.Println(a)
	c, d := f2()
	fmt.Println(c, d)

	var str = "123"
	fmt.Println(getStr(str))
	fmt.Println("==========")
	setStr(&str)
	fmt.Println(str)
}
